package com.information.manage.basic.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.information.manage.basic.model.entity.StaffDO;
import com.information.manage.basic.model.query.StaffAddQuery;
import com.information.manage.basic.model.query.StaffExportQuery;
import com.information.manage.basic.model.query.StaffPageQuery;
import com.information.manage.basic.model.query.StaffUpdateQuery;
import com.information.manage.basic.model.vo.StaffFindDetailVO;
import com.information.manage.basic.model.vo.StaffNameAndJobNumberVO;
import com.information.manage.basic.model.vo.StaffPageVO;
import com.information.manage.basic.common.result.Result;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;


public interface StaffService extends IService<StaffDO> {

    /**
     * 添加员工
     * @param staffAddQuery
     * @return
     */
    Result<Integer> addStaff(StaffAddQuery staffAddQuery, MultipartFile image);

    /**
     * 删除员工
     * @param staffIds
     * @return
     */
    Boolean deleteStaff(List<Integer> staffIds);

    /**
     * 分页查询员工
     * @param staffPageQuery
     * @return
     */
    Result<Page<StaffPageVO>> queryStaffPage(StaffPageQuery staffPageQuery);

    /**
     * 根据姓名或者工号模糊查询员工
     * @param combination
     * @return
     */
    List<StaffNameAndJobNumberVO> queryStaffByCombination(String combination);

    /**
     * 更新员工
     * @param staffUpdateQuery
     * @return
     */
    Result<Boolean> updateStaff(StaffUpdateQuery staffUpdateQuery, MultipartFile image);

    /**
     * 查询员工详情
     * @param staffId
     * @return
     */
    Result<StaffFindDetailVO> detailStaff(Integer staffId);

    /**
     * 员工退休
     * @param staffIds
     * @return
     */
    Boolean retireStaff(List<Integer> staffIds);

    /**
     * 指纹录入
     * @param staffId 员工id
     * @param fingerprint 指纹数据
     * @return
     */
    Boolean fingerPrintInput(Integer staffId, String fingerprint);

    /**
     * 删除指纹
     * @param staffId
     */
    void deleteFingerprint(Integer staffId);

    /**
     * 导出员工数据
     * @param response
     * @param staffExportQuery
     */
    void excelExport(HttpServletResponse response, StaffExportQuery staffExportQuery);

    /**
     * 员工导入模板下载
     * @param response
     */
    void downloadExcel(HttpServletResponse response);

    /**
     * 员工导入
     * @param response
     * @param file
     * @return
     */
    Result excelImport(HttpServletResponse response, MultipartFile file);

}
